package cn.ad.server.web.filter.bid;

import cn.ad.server.web.spring.service.actions.context.BidContext;
import cn.ad.server.domain.ad.Strategy;
import cn.ad.server.domain.enumration.AdFormat;

/**
 * @author dongbin.yu
 * @from 2016-08-17
 * @since V1.0
 */
public class StrategyFormatMatcher implements BidMatcherChain {

    @Override
    public boolean match(Strategy strategy, BidContext context) {
        return strategy.getFormatTypeList() != null && strategy.getFormatTypeList().contains(AdFormat.adFormatMap.get(context.getAdFormat()));
    }
}
